package com.example.wasaimovie.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.wasaimovie.Mapper.PosterMapper;
import com.example.wasaimovie.Model.entity.Film;
import com.example.wasaimovie.Model.entity.Poster;
import com.example.wasaimovie.Service.PosterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PosterServiceImpl extends ServiceImpl<PosterMapper, Poster> implements PosterService {
    @Autowired
    PosterService service;

    /**
     * 查询轮播图
     * @return 返回轮播图数据
     */
    @Override
    public List<Poster> getPoster(){
        QueryWrapper<Poster> qw = new QueryWrapper<>();
        qw.eq("status", 1);
        return service.list(qw);
    }
}
